]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Increase fade offset in FolderView
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 6 Sep 2013 01:12:28 +0000 (03:12 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 6 Sep 2013 21:54:46 +0000 (23:54 +0200)
Just as we do in AllView, we set the offset of FolderViews' fade
effect so that no icon is faded when a full page is visible.
This works fine in AllView, however in the FolderView case where
the popup's offsets eat away from the available fade height, the
effect ends up being barely noticeable at all.
While it is not ideal to apply the fade to the edge of a "full page",
it looks less ugly than the current state, so pick the lesser evil ...

https://bugzilla.gnome.org/show_bug.cgi?id=707662

js/ui/appDisplay.js

index 948d99a1d54a85fb35b11f30aad0690d0aac3b82..e0a4182a1853bcf72ecfbdd98f9a562d40a0fe78 100644 (file)
@@ -956,6 +956,14 @@ const FolderView = new Lang.Class({
 
         this._grid.adaptToSize(width, height);
 
+        // To avoid the fade effect being applied to the unscrolled grid,
+        // the offset would need to be applied after adjusting the padding;
+        // however the final padding is expected to be too small for the
+        // effect to look good, so use the unadjusted padding
+        let fadeOffset = Math.min(this._grid.topPadding,
+                                  this._grid.bottomPadding);
+        this.actor.update_fade_effect(fadeOffset, 0);
+
         // Set extra padding to avoid popup or close button being cut off
         this._grid.topPadding = Math.max(this._grid.topPadding - this._offsetForEachSide, 0);
         this._grid.bottomPadding = Math.max(this._grid.bottomPadding - this._offsetForEachSide, 0);
@@ -964,10 +972,6 @@ const FolderView = new Lang.Class({
 
         this.actor.set_width(this.usedWidth());
         this.actor.set_height(this.usedHeight());
-
-        let fadeOffset = Math.min(this._grid.topPadding,
-                                  this._grid.bottomPadding);
-        this.actor.update_fade_effect(fadeOffset, 0);
     },
 
     _getPageAvailableSize: function() {